package com.sweetcircle;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.sql.SQLException;

@EnableAsync
@SpringBootApplication(scanBasePackages = {"com.sweetcircle"})
@MapperScan(basePackages = {"com.sweetcircle.mapper"})
@EnableTransactionManagement  // 启用事务管理
@EnableScheduling
public class SweetCircleServerApplication {

    private static final Logger log = LoggerFactory.getLogger(SweetCircleServerApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(SweetCircleServerApplication.class, args);
        log.info("SweetCircle 服务启动成功！");
    }
}
